<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
	function searchform()
	{
		
		 var vote_arr = document.getElementsByName("shopID[]");
		 var idarr = new Array();
		var i=0;
		var str="";
		
		for(var j = 0; j < vote_arr.length; j++)
		{
		   if(vote_arr[j].checked == true)
		   {
			   idarr[i] = vote_arr[j].value;
			   str += vote_arr[j].value+",";
			   i++;
		   }
		   
		}
		
		if(i<=0){
			alert("未选中店铺！");
			return false;
		}
		
		if(i>=10)
		{
			alert("暂设一次更新必须小于10个店铺，当前选择了 "+i+" 个");
			return false;
		}
		
		$("#otherForm").submit();
	}
</script>
<title>网站添加新的商品</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">网站添加新的商品</h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="otherForm" method="post" action="/magento/ajaxbutton?op=shopifyaddproductnext">
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            </colgroup>
            <thead>
              <tr>
                <td colspan="2"  class="head0"><button type="button" class="submit radius2" id="btn" onClick="searchform()" >下一步</button>
               <br> 第一步：请先选择需要上新的店铺;<br>第二步：请填写商品的相关信息;<br>第三步：图片相关操作；
                </td>
              </tr>
              
              <tr>
                <td  class="head0" width="150">店铺列表</td>
                <td  class="head0"> {{foreach from=$shopname item=li key=key}}
                  <h4>{{$key}}</h4>
                  <hr>
                  {{foreach from=$li item=res key=key}}
                  <div style="width:200px; float:left;overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">
                    <input type="checkbox" name="shopID[]" value="{{$res.id}}"  />
                    {{$res.name}} </div>
                  &nbsp;&nbsp;{{/foreach}} <br>
                  <br>
                  <hr>
                  <br>
                  {{/foreach}} </td>
              </tr>
              <tr>
                <td colspan="2"  class="head0"><button type="button" class="submit radius2" id="btn" onClick="searchform()" >下一步</button></td>
              </tr>
            </thead>
          </table>
        </form>
        <br />
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>
<!--bodywrapper-->
</body>
</html>